/**
 * @param {string} s
 * @param {number} k
 * @return {number}
 */
var maxVowels = function (s, k) {
  let left = 0, res = 0,count=0
  let str = 'aeiuo'
  while (left <= s.length - k) {
    if (left < k) {
      if (str.includes(s[left])) {
        res++
      }
    }else{
      if(str.includes(s[left-k])){
        res--
      }
      if(str.includes(s[left])){
        res++
      }
    }
    count=Math.max(count,res)
    left++
  }
  return count
};
maxVowels("tryhard",4)
// "weallloveyou"
// 7